package com.demiroot.server;

import java.io.InputStream;
import java.io.OutputStream;


/**
 * A proxy intercepter that does nothing to the data
 * 
 * @author Sean Oczkowski
 */
public class AbstractProxyIntercept implements ProxyIntercept {

	@Override
	public void modifiyContents(InputStream is, OutputStream os) {
		try {
			int b = 0;
			while ((b = is.read()) != -1) {
				os.write(b);
			}
		}catch (Exception e) {
			System.err.println("Error proxy'n something!");
		}
	}

	@Override
	public HTTPResquest modifyOutgoingRequest(HTTPResquest request) {
		return request;
	}

	@Override
	public HeaderData modifyReturningHeader(HeaderData head) {
		return head;
	}

}
